import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { INestApplication } from '@nestjs/common';
export function setupSwagger(app: INestApplication): void {
  const option = new DocumentBuilder()
    .setTitle('swagger')
    .setDescription('swagger')
    .setVersion('1.0')
    .addBearerAuth()
    .build();
  const document = SwaggerModule.createDocument(app, option);
  SwaggerModule.setup('doc', app, document);
}